package com.bl.student.dao.model;

import com.bl.student.common.enums.CommentType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by yujingyi on 2018/2/1.
 */
@Entity
@Data
@Table(name = "COMMENT")
@ApiModel(value = "CommentEntity", description = "评论")
@DynamicInsert
@DynamicUpdate
public class CommentEntity {
    @Id
    @ApiModelProperty(value = "id")
    private String id;

    @ApiModelProperty(value = "内容")
    private String content;

    @ApiModelProperty(value = "创建者ID")
    @Column(name = "creator_id")
    private String creatorId;

    @ApiModelProperty(value = "创建者昵称")
    @Column(name = "creator_nickname")
    private String creatorNickname;

    @ApiModelProperty(value = "创建者头像")
    @Column(name = "creator_avatar")
    private String creatorAvatar;

    @ApiModelProperty(value = "被评论ID")
    @Column(name = "receiver_id")
    private String receiverId;

    @ApiModelProperty(value = "创建者昵称")
    @Column(name = "receiver_nickname")
    private String receiverNickname;

    @ApiModelProperty(value = "创建者头像")
    @Column(name = "receiver_avatar")
    private String receiverAvatar;

    @ApiModelProperty(value = "主体ID")
    @Column(name = "task_id")
    private String taskId;

    @ApiModelProperty(value = "分数")
    private Double point;

    @ApiModelProperty(value = "甲方发出 PARTYA 乙方发出 PARTYB")
    private String type;


    @ApiModelProperty(value = "创建时间")
    @Column(name = "create_time")
    private Date createTime;

    @ApiModelProperty(value = "修改时间")
    @Column(name = "update_time")
    private Date updateTime;

}
